<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8">
  </head>
  <body>
    <div id="box"></div>
    <script>
      var ele = document.getElementById('box');    // 获取元素对象
      ele.style.width = '100px';
      ele.style.height = '100px';
      ele.style.backgroundColor = 'red';
      ele.style.transform = 'rotate(7deg)';
    </script>
  </body>
</html>